package ru.jexp.rcp.supply.beans.project.dvs;

import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;

import ru.jexp.rcp.supply.mui.JExpSupplyMessages;
import ru.jexp.rcp.supply.swtext.JExpDialogAdapter;
import ru.jexp.rcp.supply.swtext.factory.JExpLayoutFactory;

public class DvsMergeForm extends JExpDialogAdapter implements DvsMergeFormPresenter.IView
{

	private CheckboxTableViewer viewer;

	public DvsMergeForm(Shell parentShell)
	{
		super(parentShell);
	}
	
	public CheckboxTableViewer getViewer()
	{
		return viewer;
	}

	@Override
	protected String createTitle()
	{
		return JExpSupplyMessages.Project_tab_dvs_mergeform_title;
	}

	@Override
	protected void createControls(Composite parent)
	{
		parent.setLayoutData(JExpLayoutFactory.gdFillBoth());
		parent.setLayout(new FillLayout());
		viewer = CheckboxTableViewer.newCheckList(parent, SWT.SINGLE | SWT.BORDER);//new TableViewDvsMerge(parent);
	}

	@Override
	public int openView()
	{
		return open();
	}

	@Override
	public void initView()
	{
		create();
	}
}
